# @time     :2022/1/16
# @Author   :Simple
# @FileName :main_page
from appium.webdriver.common.mobileby import MobileBy

from common.element import GetElement, GetElements
from qywx_demo.page.base_page import BasePage


class MainPage(BasePage):
    tv_search = GetElement(id_="com.xueqiu.android:id/tv_search", wait=True, describe="搜索")
    search_input = GetElement(id_="com.xueqiu.android:id/search_input_text", describe="编辑搜索内容")
    first_search = GetElement(id_="com.xueqiu.android:id/name", describe="搜索结果第一个")
    stock_tab = GetElement(xpath="//*[@text='股票']", describe="股票tab")
    stock_name = GetElement(id_="com.xueqiu.android:id/stockName", describe="股票名称")
    price_btn = GetElement(id_="com.xueqiu.android:id/current_price", describe="股票现价")
    cancel_btn = GetElement(xpath="//*[@text='取消']", describe="取消按钮")


